
static void load(int toState) 
{
	switch (toState) 
	{
		#ifdef HAS_INTRO
		case STATES.INTRO:
			try 
			{
				// TODO: unhardcode this
				logo = DGraph.resizeImage(cGame_g.loadImage("/logo.png"), proportional);
				logo_o = DGraph.resizeImage(cGame_g.loadImage("/logo_o.png"), proportional);
				logo_pel = DGraph.resizeImage(cGame_g.loadImage("/logo_pel.png"), proportional);
			}
			catch (Exception e) 
			{
				cGame.error = new String ("Error loading logo " + __FILE__ + " " + __LINE__);
			}
		break;
		#endif
	
		#ifdef HAS_SET_KEYS
		case STATES.SET_KEYS:
			try
			{
				// TODO: unhardcode this
				dpad = DGraph.resizeImage(cGame_g.loadImage("/dpad.png"), proportional);
				okBut = DGraph.resizeImage(cGame_g.loadImage("/ok.png"), proportional);
				okButSelected = DGraph.resizeImage(cGame_g.loadImage("/okSel.png"), proportional);
				arrow = DGraph.resizeImage(cGame_g.loadImage("/flecha.png"), proportional);
				arrowSelected = DGraph.resizeImage(cGame_g.loadImage("/flechaSel.png"), proportional);
			}
			catch (Exception e) 
			{
				cGame.error = new String ("Error loading general resources. " + __FILE__ + " " + __LINE__);
			}
		break;
		#endif
	
		#ifdef HAS_TEAM_SELECTION
		case STATES.TEAM_SELECTION:
			try
			{
				shields = new Image [TEXT.TEAMS_FILES.length];
				for (int i = 0 ; i < shields.length ; ++i) 
				{
					shields[i] = DGraph.resizeImage(cGame_g.loadImage("/" + TEXT.TEAMS_FILES[i].toLowerCase() + ".png"), proportional);
				}
			}
			catch (Exception e) 
			{
				cGame.error = new String ("Error loading teams shields. " + __FILE__ + " " + __LINE__);
			}
		break;
		#endif
		
		default:
		break;
	}
}
